package com.shy.pet.controller.Head;

import com.shy.pet.common.R;
import com.shy.pet.entity.Donations;
import com.shy.pet.service.DonationsService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@RequestMapping("/head")
public class Donationscontroller {
    @Autowired
    DonationsService donationsService;
    @PostMapping("/donate")
    public R<String> donations(@RequestBody Donations donation){
     return donationsService.donations(donation);
    }

}
